package com.dingxin.ship_together_api.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
* Author: ctj
* Date: 2022-09-30
* Time: 17:15
*/

/**
    * 航线表
    */
@ApiModel(value="航线spu表")
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "ship_together.route_spu")
public class RouteSpu implements Serializable {
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @ApiModelProperty(value="")
    private Long id;

    /**
     * 船只id
     */
    @TableField(value = "ship_id")
    @ApiModelProperty(value="船只id")
    private Long shipId;

    /**
     * 航线类型 0-拼船  1-包船
     */
    @TableField(value = "route_type")
    @ApiModelProperty(value="航线类型 0-拼船  1-包船")
    private Integer routeType;

    /**
     * 总座位数，冗余字段
     */
    @TableField(value = "seats")
    @ApiModelProperty(value="总座位数")
    private Integer seats;

    /**
     * 最低成单座位数
     */
    @TableField(value = "success_seats")
    @ApiModelProperty(value="最低成单座位数")
    private Integer successSeats;

    /**
     * 下单截止时间
     */
    @TableField(value = "deadline")
    @ApiModelProperty(value="下单截止时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date deadline;

    /**
     * 创建人
     */
    @TableField(value = "create_by" ,fill = FieldFill.INSERT)
    @ApiModelProperty(value="创建人")
    @JsonIgnore
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    @ApiModelProperty(value="创建时间")
    @JsonIgnore
    private Date createTime;

    /**
     * 更新人
     */
    @TableField(value = "update_by",fill = FieldFill.UPDATE)
    @ApiModelProperty(value="更新人")
    @JsonIgnore
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(value = "update_time",fill = FieldFill.UPDATE)
    @ApiModelProperty(value="更新时间")
    @JsonIgnore
    private Date updateTime;

    /**
     * 是否删除
     */
    @TableField(value = "deleted")
    @ApiModelProperty(value="是否删除")
    @JsonIgnore
    private Boolean deleted;

    private static final long serialVersionUID = 1L;

    public static final String COL_ID = "id";

    public static final String COL_SHIP_ID = "ship_id";

    public static final String COL_ROUTE_TYPE = "route_type";

    public static final String COL_SEATS = "seats";

    public static final String COL_SUCCESS_SEATS = "success_seats";

    public static final String COL_DEADLINE = "deadline";

    public static final String COL_CREATE_BY = "create_by";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_UPDATE_BY = "update_by";

    public static final String COL_UPDATE_TIME = "update_time";

    public static final String COL_DELETED = "deleted";
}